with Generic_Expresion;
package body Generic_Expression is

   -------
   -- = --
   -------
   function "=" (X,Y : Expression_T) is
   begin
      case X.Model
         when Valeur =>
           case Y.Model =>
              when Valeur => return X.Val=Y.Val;
              when Unaire => return False;
              when Binaire => return False;
           end case;
         when Unaire =>
            case Y.Model
               when Valeur =>  return False;
               when Unaire =>
                  return (X.Operator = Y.Operator and X.Argument=Y.Argument);
               when Binaire => return False;
            end case;
         when Binaire =>
            case Y.Model
               when Valeur => return False;
               when Unaire => return False;
               when Binaire =>
                  return (X.Operator =Y.Operator and then X.Avant = Y.Avant and then X.Apres = Y.Apres);
            end case;
      end case;
   end "=";
end Generic_Expression;
